﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlTypes;
using System.Data.SqlClient;

namespace ConsoleApp6
{
    class Program
    {
        static void Main(string[] args)
        {
            string connectionString = "server=LAPTOP-V915KUF3;database=master；uid=sa;pwd=";
            SqlConnection sqlConnection = new SqlConnection(connectionString);
            sqlConnection.Open();
            var sqlcommandString = "select * from Users";
            SqlCommand sqlCommand = new SqlCommand(sqlcommandString,sqlConnection);
            var sda = sqlCommand.ExecuteReader();
            while (sda.Read())
            {
                Console.WriteLine("{0}\t{1}\t{2}\t",sda["Id"],sda["name"],sda["stringId"]);
            }
            sqlConnection.Close();
        }
    }
}